Connected insulin pen and smartphone app